package com.echoesnet.echoesshortvideo.views.adapters;

import android.app.Activity;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.echoesnet.echoesshortvideo.R;

import java.util.List;


/**
 * Copyright (C) 2017 在线回声（天津）科技发展有限公司
 * 在线回声完全享有此软件的著作权，违者必究
 *
 * @author Administrator
 * @version 1.0
 * @modifier
 * @createDate 2018/4/25
 * @description
 */
public class PopSimpleAdapter extends RecyclerView.Adapter
{
    private Activity mAct;
    private List<String> mList;
    public PopSimpleAdapter(Activity mAct,List<String> mList)
    {
        this.mAct = mAct;
        this.mList = mList;
    }

    @NonNull
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
    {
        View view = LayoutInflater.from(mAct).inflate(R.layout.item_pop_bottom,parent,false);
        MyViewHolder viewHolder = new MyViewHolder(view);

        return viewHolder;
    }

    @Override
    public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position)
    {
        MyViewHolder viewHolder = (MyViewHolder) holder;
        String title = mList.get(position);
        viewHolder.tvTitle.setText(title);
    }

    @Override
    public int getItemCount()
    {
        return 0;
    }

    public class MyViewHolder extends RecyclerView.ViewHolder
    {
        TextView tvTitle;
        public MyViewHolder(View itemView)
        {
            super(itemView);
            tvTitle = (TextView) itemView.findViewById(R.id.tv_title);

        }
    }
}
